package com.example.yuejian.yuejian.bean;

import com.google.gson.Gson;

import org.json.JSONException;
import org.json.JSONObject;

/**
 * Created by Administrator on 2017/10/11.
 */

public class ClubClass {

    /**
     * id : 1
     * name : 设计课程
     * intro : 哈啊啊啊啊啊啊啊啊啊啊
     * grade : 1
     * price : 12
     * club_id : 1
     */

    private int id;
    private String name;
    private String intro;
    private int grade;
    private String price;
    private int club_id;

    public static ClubClass objectFromData(String str, String key) {

        try {
            JSONObject jsonObject = new JSONObject(str);

            return new Gson().fromJson(jsonObject.getString(str), ClubClass.class);
        } catch (JSONException e) {
            e.printStackTrace();
        }

        return null;
    }

    public void setId(int id) {
        this.id = id;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setIntro(String intro) {
        this.intro = intro;
    }

    public void setGrade(int grade) {
        this.grade = grade;
    }

    public void setPrice(String price) {
        this.price = price;
    }

    public void setClub_id(int club_id) {
        this.club_id = club_id;
    }

    public int getId() {
        return id;
    }

    public String getName() {
        return name;
    }

    public String getIntro() {
        return intro;
    }

    public int getGrade() {
        return grade;
    }

    public String getPrice() {
        return price;
    }

    public int getClub_id() {
        return club_id;
    }
}
